<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>类选择器案例-三个颜色的盒子</title>
    <style>
      .red {
        width: 100px;
        height: 100px;
        /* 背景颜色 */
        background-color: red;
      }
      .green {
        width: 100px;
        height: 100px;
        background-color: green;
      }
    </style>
  </head>
  <body>
    <div class="red">红色</div>
    <div class="green">绿色</div>
    <div class="red">红色</div>
  </body>
</html>
